<?php


    $curl = curl_init();
    $timeout = 10;
    curl_setopt($curl, CURLOPT_URL, 'http://baidu.com');
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, $timeout);
    $contents = curl_exec($curl);
    curl_close($curl);

    echo $contents;
    exit();

// $content = file_get_contents('http://weibo.com/lyverygood/home?wvr=5&lf=reg');

// echo $content;

//echo phpinfo();

include 'Snoopy.class.php';

$snoopy = new Snoopy;

/*
$url = 'http://www.codesky.net/article/201202/163586.html';

$snoopy->fetch($url);

echo $snoopy->results;
*/

$formvars['username'] = '13286796203';
$formvars['pwd'] = 'ly@13421005892';

$action = 'http://weibo.com/login';
$snoopy->submit($action, $formvars);

echo $snoopy->fetchform;


/*
echo $snoopy->results;
$snoopy->submittext;
$snoopy->submitlinks;
$snoopy->error;
*/
?>